package com.cl.base;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

public interface BaseDao<T> {
	
	void save(T entity);
	
	void delete(T entity);
	
	void update(T entity);
	
	T findById(Serializable id);
	
	List<T> findAll();
	
	Integer getTotalCount(DetachedCriteria dc);
	
	List<T> getPageList(DetachedCriteria dc,int start,int pageSize);
	
	int findByName(String queryName, String name);
	
	void updateByTis(String queryName, int pId);
	
	List<T> finByDetachedCriteria(DetachedCriteria dc);
}
